***************************************************
****----			Figure A5	  		   ----****
***************************************************

clear all
cap log close 
set more off

****---- Change directory

global data "/Users/Replication material/Data"

****---- Figure

use "$data/dataset_replication.dta", clear

global controls Capoluogodiprovincia  population_density_1911 expenditures_1912_PC surplus_tot_1912_PC exp_police_hygiene_1912_PC exp_just_secur_1912_PC  exp_edu_1912_PC exp_public_work_1912_PC share_literate share_literate_male share_literate_female share_male


forval i=1/20{
qui reghdfe gini_log aug_dec_18_sd $controls if N_contribuenti_ven!=`i', cluster(distretto_FE) absorb(i.Zonaaltimetrica i.N_contribuenti_quartile##i.distretto_FE)
estimates store _`i'
}

coefplot _1, base offset(0) color(black) ciopts(recast(rcap) color(black black) lwidth(*0.75 *1.25)) || _2	|| _3	|| _4	|| _5	|| _6	|| _7	|| _8	|| _9	|| _10	|| _11	|| _12	|| _13	|| _14	|| _15	|| _16	|| _17	|| _18	|| _19	|| _20, ///
graphregion(color(white)) keep(aug_dec_18_sd) vertical yline(0) yline(0.022, lcolor(gray) lpattern(dash)) bycoefs byopts(xrescale) msize(small) levels(95 90) ///
ylabel(-.01(.01).04, angle(horizotal)) xlabel(1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "10" 11 "11" 12 "12" 13 "13" 14 "14" 15 "15" 16 "16" 17 "17" 18 "18" 19 "19" 20 "20" , angle(45)) ytitle("Gini index") xtitle("Ventile excluded (N of taxpayers)") title("") 
